package com.sixth.docker.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sixth.core.entity.Scheduling;
import com.sixth.core.vo.R;
import com.sixth.docker.service.SchedulingService;
import com.sixth.docker.service.impl.SchedulingServiceImplApp;
import com.sixth.docker.vo.SchedulingVo;
import com.sixth.docker.vo.SchedulingVo1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @program: sixth-hospital-parent
 * @description:
 * @author: 赵庆龙
 * @create: 2024-08-16 09:24
 **/
@RestController
@RequestMapping("/doctor/scheduling")
public class SchedulingController {
    @Autowired
    private SchedulingService schedulingService;
    @Autowired
    private SchedulingServiceImplApp schedulingServiceImplApp;
    @GetMapping("/selectAll")
    public R<List<Scheduling>> selectAll(Integer deptId, String schedulingType, String subsectionType, String schedulingDay) {
        return schedulingService.selectAll(deptId, schedulingType, subsectionType, schedulingDay);
    }

    @PostMapping("/selectScheduling")
    public R<Map<String,Object>> selectScheduling(@RequestBody SchedulingVo schedulingVo) {
        return schedulingService.selectScheduling(schedulingVo);
    }

    @PostMapping("/insertOrUpdate")
    public R<Object> insertOrUpdate(@RequestBody SchedulingVo1 schedulingVo1) {
        return schedulingService.insertOrUpdate(schedulingVo1);
    }
    @PostMapping("/selectSchedulingApp")
    public R<Map<String,Object>> selectSchedulingApp(@RequestBody SchedulingVo schedulingVo) {
        return schedulingServiceImplApp.selectScheduling(schedulingVo);
    }

}
